Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feat: Search mail bodies #8897

Merged
merged 1 commit into from
Oct 25, 2023
Merged

Feat: Search mail bodies #8897

merged 1 commit into from
Oct 25, 2023

Conversation

hamza221
Copy link
Contributor

@hamza221 hamza221 commented Sep 27, 2023

Fixes #8050

  • Add a field in advanced search for body only search

@@ -832,7 +832,7 @@ public function findIdsByQuery(Mailbox $mailbox, SearchQuery $query, ?int $limit

// createParameter
if ($uids !== null) {
$select->andWhere(
$select->orWhere(
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Debugging leftover?

@hamza221 hamza221 marked this pull request as ready for review September 29, 2023 09:28
@ChristophWurst
Copy link
Member

Code looks good!

Right now there is a new dedicated input in the advanced search. We also discussed an opt-in feature to search in bodies in the search box on top of envelopes, right? I'm fine with doing another PR.

@sergioeix
Copy link

cant blive this is not option yet, very usefull. Cant wait to test it :)

@ChristophWurst
Copy link
Member

If I search for a body term only, the search doesn't really have an affect. I also get messages without the search term. Is it the AND vs OR combination of the IMAP and DB results?

@hamza221
Copy link
Contributor Author

If I search for a body term only, the search doesn't really have an affect. I also get messages without the search term. Is it the AND vs OR combination of the IMAP and DB results?

It is. So if I'm correct, the only case where we need an orWhere is when we're searching both body and subject, all other combinations should be andWhere.

@ChristophWurst
Copy link
Member

Works!

@HLFH
Copy link

HLFH commented Oct 31, 2023

@ChristophWurst Hi. Could we have this released in Nextcloud Mail 3.4.5? Thank you!

@HLFH
Copy link

HLFH commented Oct 31, 2023

@ChristophWurst

We also discussed an opt-in feature to search in bodies in the search box on top of envelopes, right? I'm fine with doing another PR.

Could we consider to have opt-in features in basic search set in the advanced search settings like in Roundcube?
Screenshot 2023-10-31 at 20 51 52

EDIT: I submitted the issue: #9044 in order to track it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

🔎📄👤 Search message body
5 participants